/*
 * c_g_module_config.h
 *
 *  Created on: Jan 11, 2014
 *      Author: bohni
 */

#ifndef C_G_MODULE_CONFIG_H_
#define C_G_MODULE_CONFIG_H_

///////////////////////////////////////////
// SIGNAL PIN
// INTERRUPT PIN for MAIN MCU

#define SIGNAL_PIN_DDR		DDRB
#define SIGNAL_PIN			PB7
#define SIGNAL_PORT			PORTB


////////////////////////////////////////////
// I2C MODULE ADDRESS

#define I2C_SLAVE_ADR		0x38
#define I2C_FREQ			400000


/////////////////////////////////////////////
// MODULE COMMANDS

// MODULE

#define RESTART_MODULE			0x01

//COMPASS
#define GET_NORTH				0x10
#define GET_MAGNET_VALUES  		0x11

#define COMPASS_SELF_TEST		0x12
#define COMPASS_TEMP_COMP		0x13

#define GET_COMPASS_IDENT		0x19

//GPS
#define GET_LOCATION			0x20



//EEPROM
#define READ_EEPROM				0x30 //Next Byte: EEPROM ADR
#define UPDATE_EEPROM			0x31//Next Bytes: EEPROM ADR , VALUE





///////////////////////////////////////////
// EEPROM CONFIG

#define COMPASS_CONFIG_A_EEPROM_ADDRESS 	0x01
#define COMPASS_CONFIG_B_EEPROM_ADDRESS 	0x02
#define COMPASS_MODE_EEPROM_ADRESS	 		0x03







#endif /* C_G_MODULE_CONFIG_H_ */
